source(here::here("code/load.R"))

here("data", "meta_analyses_raw", "WalEtAl2020", "Fig2_p361_ocr.csv") |>
  read_csv() |>
  mutate(meta_id = "WalEtAl2020",
         subfield = "AP",
         study_year = str_extract(Study,  "(?<=\\().+?(?=\\))"),
         std.error = (Upper_limit - Lower_limit) / 3.92,
         question = "What is the average effect of fact-checking on message-consistent beliefs?",
         overall_effect = "yes") |>
  select(meta_id,
         subfield,
         question,
         study_id = Study,
         study_year,
         estimate = Std_diff_in_means,
         std.error,
         overall_effect) |>
  #throw out the last row, which is the meta-analytic estimate and se
  filter(!is.na(study_id)) |>
  write_csv(here("data", "meta_analyses_clean", "WalEtAl2020.csv"))
